package com.kotlin.novel

import android.app.Application
import android.content.Context
import androidx.room.Room
import com.kotlin.novel.db.AppDatabase
import kotlin.properties.Delegates

lateinit var appDB: AppDatabase

class App : Application() {

    companion object {

        lateinit var app: App
        var context: Context by Delegates.notNull()
            private set

    }

    override fun onCreate() {
        super.onCreate()
        app = this
        appDB = Room.databaseBuilder(
                this,
                AppDatabase::class.java, "db_novel"

        ).build()

    }
}
